{% from 'IcsocUIBundle:Macro:actions.html.twig' import button %}
{% import 'IcsocIvrBundle:Ivr:node_fields.html.twig' as ivr %}

<form class="form-horizontal" action="" method="post" name="form">
    {{ ivr.node_name()  }}
    {{ ivr.play_sound('Play Sound','sound',sounds_type,sounds_list)  }}
    <div class="form-group">
        <label for="form_play_times" class="col-sm-3 control-label no-padding-right">{{ 'attempts times'|trans }}  </label>
        <div class="col-sm-9">
            <select id="form_play_times" name="form[play_times]" class="col-sm-6">
                {% for play_times in play_times %}
                    <option value="{{ play_times }}">
                        {{ play_times }}
                    </option>
                {% endfor %}
            </select>
            <span class="help-button col-xs-3 col-sm-1" data-rel="popover" data-trigger="hover" data-placement="bottom" data-content="{{ "node key play_times help"|trans }}" title="" data-original-title="">?</span>
        </div>
    </div>
    <div class="form-group">
        <label for="form_max_keys_length" class="col-sm-3 control-label no-padding-right">{{ 'Max keys length'|trans }} <font color="red">*</font> </label>
        <div class="col-sm-9">
            <input type="number" id="form_max_keys_length" name="form[max_keys_length]" required="required" class="col-sm-6" value="1">
            <span class="help-button col-xs-3 col-sm-1" data-rel="popover" data-trigger="hover" data-placement="bottom" data-content="{{  'max_keys_length help'|trans }}" title="" data-original-title="">?</span>
        </div>
    </div>
    <div class="form-group">
        <label for="form_timeout" class="col-sm-3 control-label no-padding-right">{{ "Timeout"|trans }}  </label>
        <div class="col-sm-9">
            <select id="form_timeout" name="form[timeout]" class="col-sm-6">
                {% for timeout in timeout %}
                    <option value="{{ timeout }}">
                        {{ timeout }}
                    </option>
                {% endfor %}
            </select>
            <span class="help-button col-xs-3 col-sm-1" data-rel="popover" data-trigger="hover" data-placement="bottom" data-content="{{ "keys timeout help"|trans }}" title="" data-original-title="">?</span>
        </div>
    </div>
    <div class="form-group">
        <label for="form_variable_name" class="col-sm-3 control-label no-padding-right">{{ "Node Key Variable names"|trans }} <font color="red">*</font> </label>
        <div class="col-sm-9">
            <input type="text" id="form_variable_name" name="form[variable_name]" class="col-sm-6">
            <span class="help-button col-xs-3 col-sm-1" data-rel="popover" data-trigger="hover" data-placement="bottom" data-content="{{ 'set variable name help'|trans }}" title="" data-original-title="">?</span>
        </div>
    </div>
    {{ ivr.is_tran_front }}
    {{ ivr.ivr_count() }}
    <div class="clearfix well well-sm">
        <div class="col-md-offset-4 col-md-8">
            {{ button('Save', 'btn-node-attr') }}
        </div>
    </div>
</form>